-module('ex_7.14_flow_sequence_entries').

-include_lib("eunit/include/eunit.hrl").

-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").

single_test_() ->
    ?_assertMatch(
      {yamerl_parser,
        {file,?FILENAME},
        [],
        <<>>,
        89,
        true,
        [],
        0,
        90,
        9,
        1,
        false,
        8,
        2,
        utf8,
        false,
        undefined,
        _,
        _,
        [],
        {bcoll,root,0,-1,1,1,-1,1,1},
        false,
        false,
        false,
        [{impl_key,false,false,undefined,undefined,1,1}],
        false,
        false,
        _,
        [],
        0,
        25,
        24,
        undefined,
        undefined,
        _,
        false,
        [],
        [
          {yamerl_stream_end,8,2},
          {yamerl_doc_end,8,2},
          {yamerl_collection_end,8,1,flow,sequence},
          {yamerl_collection_end,7,13,flow,mapping},
          {yamerl_scalar,7,9,
            {yamerl_tag,7,9,{non_specific,"?"}},
            flow,plain,"pair"},
          {yamerl_mapping_value,7,7},
          {yamerl_scalar,7,1,
            {yamerl_tag,7,1,{non_specific,"?"}},
            flow,plain,"single"},
          {yamerl_mapping_key,7,1},
          {yamerl_collection_start,7,1,
            {yamerl_tag,7,1,{non_specific,"?"}},
            flow,mapping},
          {yamerl_sequence_entry,7,1},
          {yamerl_collection_end,6,17,flow,sequence},
          {yamerl_scalar,6,10,
            {yamerl_tag,6,10,{non_specific,"?"}},
            flow,plain,"nested"},
          {yamerl_sequence_entry,6,10},
          {yamerl_collection_start,6,8,
            {yamerl_tag,6,8,{non_specific,"?"}},
            flow,sequence},
          {yamerl_sequence_entry,6,8},
          {yamerl_scalar,5,1,
            {yamerl_tag,5,1,{non_specific,"?"}},
            flow,plain,"plain text"},
          {yamerl_sequence_entry,5,1},
          {yamerl_scalar,3,11,
            {yamerl_tag,3,11,{non_specific,"!"}},
            flow,single_quoted,"single quoted"},
          {yamerl_sequence_entry,3,11},
          {yamerl_scalar,2,1,
            {yamerl_tag,2,1,{non_specific,"!"}},
            flow,double_quoted,"double quoted"},
          {yamerl_sequence_entry,2,1},
          {yamerl_collection_start,1,1,
            {yamerl_tag,1,1,{non_specific,"?"}},
            flow,sequence},
          {yamerl_doc_start,1,1,{1,2},_},
          {yamerl_stream_start,1,1,utf8}
        ]
      },
      yamerl_parser:file(?FILENAME)
    ).
